package br.unisinos.projetotcc.pesquisa;

import javax.tools.*;

public class SimpleCompileTest {

	public static void main(String[] args) {
//		String fileToCompile = "test" + java.io.File.separator + "MyClass.java";
		String fileToCompile = "C:\\Users\\MARVAN\\Desktop\\teste\\Teste.java";
		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
		int compilationResult = compiler.run(null, null, null, fileToCompile);
		if (compilationResult == 0) {
			System.out.println("Compilation is successful");
		} else {
			System.out.println("Compilation Failed");
		}
	}
}
